#include <iostream>
#include <cstring>
using namespace std;
#define Max 5000

int t1[Max],t2[Max],t3[Max];

int to[Max];
int ans;

void exchange(char *s,int *t)
{
	int i,len;
	len=strlen(s);
//	memset(t,0,sizeof(int)*Max);
	
	for (i=len-1;i>=0;i--)
	{
		t[len-i]=s[i]-'0';
	}
	t[0]=len;
}


void plus1(int *t1,int *t2)
{
	int i,len;
	
	memset(to,0,sizeof(to));
	len=t1[0]>t2[0]?t1[0]:t2[0];
	
	for (i=1;i<=len;i++)
	{
		to[i]+=t1[i]+t2[i];
		if (to[i]>=10)
		{
			to[i+1]++;
			to[i]-=10;
			ans ++;
		}
	}
	if (to[len+1]>0) len++;
	to[0]=len;
}

char s1[Max],s2[Max],answer[Max];

int main()
{

	while (1)
	{
	    memset(s1, 0, sizeof(s1));
	    memset(s2, 0, sizeof(s2));
	    cin >> s1 >> s2;
	    if (strlen(s1)==1 && strlen(s2)==1 && s1[0]=='0' && s2[0]=='0') break;
	    memset(t1, 0, sizeof(t1));
	    memset(t2, 0, sizeof(t2));
    	exchange(s1,t1);
    	exchange(s2,t2);
    	ans=0;
    	plus1(t1, t2);
    	if (ans==0) cout <<"No carry operation." << endl;
    	else if (ans==1) cout << ans <<" carry operation." << endl;
    	else             cout << ans <<" carry operations." << endl;
	}    
	return 0;
}    